package com.alks.function.mapper.stockdept.pcfactorystockquery;

import com.alks.entity.data.entity.MpMtlSum;
import com.alks.function.data.dto.procurement.PurchaseOrderDto;
import com.alks.function.data.request.procurement.LotNoRequest5;
import com.alks.function.data.request.procurement.LotNoRequest6;
import com.alks.function.data.request.procurement.NotOrderDetailsRequest;
import com.alks.function.data.request.stockdept.pcfactorystockwork.PurDisAddRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 材料汇总-指令 Mapper 接口
 * </p>
 *
 * @author ms
 * @since 2023-11-16
 */
public interface SD_SQ_MpMtlSumMapper extends BaseMapper<MpMtlSum> {
    /*新增汇总记录*/
    void fdPurDisAdd(@Param("request") List<PurDisAddRequest> request, @Param("userName") String userName, @Param("now") LocalDateTime now, @Param("loginName") String loginName);

    /*新增汇总记录：材料清购作业批处理*/
    int fdPurDisAddByMClearan(@Param("request") List<LotNoRequest5> request, @Param("userName") String userName, @Param("now") LocalDate now, @Param("loginName") String loginName);

    /*新增汇总记录：零星订购作业批处理*/
    int fdPurDisAddBySdClearan(@Param("request") List<NotOrderDetailsRequest> request, @Param("userName") String userName, @Param("now") LocalDate now, @Param("loginName") String loginName);

    /*删除:材料汇总表*/
    int fdPurDisDelete(LotNoRequest6 request);

    /*批量删除:材料汇总表      MP_MTL_SUM*/
    int fdPurDisDeleteBatch(List<LotNoRequest6> list, String companyId);

    /*修改:材料汇总表      MP_MTL_SUM*/
    int updateFdPurDisAdd(PurchaseOrderDto dto);
}
